<template>
  <div class="maincontentBox">
    <designReview
      ref="designReview"
      :projectId="Number(projectId)"
      :designList="designList"
      :linkName="linkName"
      :firstLinkName="firstLinkName"
      :canEdit="canEdit"
    ></designReview>
  </div>
</template>

<script>
  import {
    getFileDetail
  } from "@/api/project1/designChange/countyApply/index";
  import designReview from "./dantiMap/designReview";
  export default {
    name: "fujianIndex",
    components: {
      designReview,
    },
    data() {
      return {
        projectId:localStorage.getItem("projectId"),
        designList: [], // 单体图列表
      };
    },
    props:{
      canEdit: {
          type: Boolean,
          require: true
      },
      linkName: {
          type: String,
          require: true
      },
      firstLinkName: {
          type: String,
          require: true
      },
    },
    created(){
      this._getFileDetail()
    },
    methods: {
      // 获取附件文件详情数据
      _getFileDetail() {
        console.log(this.projectId)
        const loading = this.$loading({
          lock: true,
          text: "Loading",
          spinner: "el-icon-loading",
          background: "rgba(0, 0, 0, 0.7)"
        });
        var data={
          projectId:this.projectId
        }
        getFileDetail(data)
          .then(res => {
            // if (res.data.drawings) {
            //   this.drawingList = res.data.drawings; // 图层文件列表
            // }
            if (res.data.designList) {
              this.designList = res.data.designList; // 单体设计图列表
            }
            loading.close();
          })
          .catch(err => {
            loading.close();
          });
      },
    },
  };
</script>

<style scoped lang="scss">
  .maincontentBox{
    min-height: calc(100vh - 200px);
  }
</style>